<?php include "htmlBase/header.php"; ?>

<?php
include "ViewBase.php";
$Entidades = MontarHeadPHP("Saude");
MontarHeadScript("Saude");
?>

<div class="page">
    <div class="page-header">
        <div class="page-header-content">
            <h1>Saude <small>(Pesquisar)</small></h1>
        </div>
        <div class="progress-bar" align="rigth">
            <div class="bar bg-color-blue" style="width: 75%"></div>
        </div>
    </div>
    <br/>
    <div class="page">
        <div class="page-region">
            <div class="page-region-content">

                <table class="hovered bordered">
                    <th></th>
                    <th>Id</th>
                    <th>id_Responsavel</th>
                    <th>DoenteNaCasa</th>
                    <th>TipoDoenca</th>
                    <th>GestanteNaCasa</th>
                    <th>GestanteAmamentando</th>
                    <th>MesGestacao</th>
                    <th>GestantePossuiPreNatal</th>
                    <th>DeficienteNaCasa</th>
                    <th>DeficienteFrequentaCras</th>
                    <th>IdosoNaCasa</th>
                    <th>IdosoFrequentaCras</th>
                    <th>VacinacaoEmDia</th>

                    <?php
                    if ($Entidades == null)
                    {
                        ?>
                        <tr>
                            <td colspan="8">
                                <h3 style="text-align:center">Sem Resultado</h3>
                            </td>
                        </tr>
                        <?php
                    } else
                    {
                        foreach ($Entidades as $Saude)
                        {
                            ?>
                            <tr onclick="Selecionar(<?php echo $Saude->Id; ?>)">
                                <td width="1"><input type="radio" name="RadioId" Id="<?php echo $Saude->Id; ?>" value="<?php echo $Saude->Id; ?>"></td>
                                <td><?php echo $Saude->Id; ?></td>
                                <td><?php echo $Saude->id_Responsavel; ?></td>
                                <td><?php echo $Saude->DoenteNaCasa; ?></td>
                                <td><?php echo $Saude->TipoDoenca; ?></td>
                                <td><?php echo $Saude->GestanteNaCasa; ?></td>
                                <td><?php echo $Saude->GestanteAmamentando; ?></td>
                                <td><?php echo $Saude->MesGestacao; ?></td>
                                <td><?php echo $Saude->GestantePossuiPreNatal; ?></td>
                                <td><?php echo $Saude->DeficienteNaCasa; ?></td>
                                <td><?php echo $Saude->DeficienteFrequentaCras; ?></td>
                                <td><?php echo $Saude->IdosoNaCasa; ?></td>
                                <td><?php echo $Saude->IdosoFrequentaCras; ?></td>
                                <td><?php echo $Saude->VacinacaoEmDia; ?></td>
                            </tr>
                            <?php
                        }
                    }
                    ?>
                </table>

                <div class="input-control" style="margin-left: auto; margin-right: auto;">
                    <button class="standart default" onclick="Novo()">Novo</button>
                    <button class="standart" onclick="Alterar()">Alterar</button>
                    <button class="standart" onclick="Excluir()">Excluir</button>
                    <a href="Index.php" class="button standart bg-color-lighten" style="float: right">Voltar</a>
                </div>

            </div>
        </div>
    </div>

</div>

<?php include "htmlBase/footer.php"; ?>
